﻿using System;

namespace HEFramework
{
    public interface ILateUpdate
    {
    }

    public interface ILateUpdateSystem : ISystemType
    {
        void Run(Entity _o);
    }

    [EntitySystem]
    public abstract class LateUpdateSystem<T> : ILateUpdateSystem where T : Entity, ILateUpdate
    {
        Type ISystemType.Type()
        {
            return typeof(T);
        }

        Type ISystemType.SystemType()
        {
            return typeof(ILateUpdateSystem);
        }

        int ISystemType.GetInstanceQueueIndex()
        {
            return InstanceQueueIndex.LateUpdate;
        }

        void ILateUpdateSystem.Run(Entity _o)
        {
            this.LateUpdate((T)_o);
        }

        protected abstract void LateUpdate(T _self);
    }
}